package edu.ivanov.apm.quant;

import edu.ivanov.apm.ui.GraphScene;

/**
 * User: Илья
 * Date: 06.10.13
 * Time: 10:55
 */
public class SchrodingerEquation {

	public static void main(String[] args) {
		if (args.length < 1) {
			System.err.println("Не задан путь файла для чтения параметров решения уравнения");
			System.exit(1);
		}

		Solution[] solutions = null;
		try {
			Solver solver = new Solver();
			new ParametersReader().readFromFile(args[0], solver);
			solutions = solver.solve();
		} catch (Throwable e) {
			System.err.println(e.getMessage());
			System.exit(2);
		}

		if (solutions == null || solutions.length == 0)
			return;

		GraphScene.show(solutions);
	}
}
